Repository navigation
Name the lock, however an action meets it (CHALLENGES 389) - #332
Merged
Merged
Conversation
Fixes #327. lock lock now waits until a read sees the lock. Any tool that fails reading on a locked device answers device_not_ready. A touch at a point on an Android screen that is off is refused, and scroll-to leaves a lock screen unswiped. Measured, tap after lock: Android 15 and 17, 8 of 8 exit 3, none landed; Android 15 before, 8 of 8 false successes. iOS 26.5: scroll-to 8 of 8 exit 3, still locked. lock takes about 0.6 s on Android and 1.5 s on iOS. lock.sh fails on main and passes here. device-state, gestures, locators, mobium-app and dialogs pass on Android; biometric, gestures, locators and mobium-app on iOS. The emulator froze once during a run and passed gestures after a restart. A sleep from outside Mobium, tapped by element within the half second, is still reported: 4 of 4 with input keyevent KEYCODE_SLEEP.
This was referenced Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #327.
lock lockanswered once the device said asleep, while reads went on showing the app for about half a second. A tap in that window answeredtapped, exit 0, and reached nothing. Going through every action on a locked device found the rest.What changes
lock lockwaits until a read will see the lock: on Android forinteractiveStateto leaveGOING_TO_SLEEP, on iOS for SpringBoard in front. Each is bounded at 3 s.device_not_ready, in one place,lockedFailure.find,wait,scroll-to,swipe up,keyboard --textandcurrentblamed a changing screen, exit 1.scroll-towith the system shell in front asks whether the device is locked.scroll-toswiped an iOS lock screen, which can unlock it.Asleep is not locked. A lock screen that is up takes touches, a swipe up or a PIN pad, so nothing refuses those.
Measured
lock lockscroll-to, iOS 26.5locknow takes about 0.6 s on Android and 1.5 s on iOS. The newlock.shfails onmainon both devices and passes here. Unlocked point gestures still land, and a tap straight afterlock unlocklanded 6 of 6.device-state,gestures,locators,mobium-appanddialogspass on Android;biometric,gestures,locatorsandmobium-appon iOS. The emulator froze once during a run, and passedgesturesafter a restart.Not settled here
input keyevent KEYCODE_SLEEP. Asking before every touch would close it for 45 ms of a 250 ms tap on the emulator, so that is left as a separate decision.press backandpress homeon a sleeping Android answer after 20 s.